function init(){
	
	document.getElementById("delete").addEventListener("click",deleteUsers,false);
}
function deleteUsers(){
	var list=document.getElementsByClassName("list");
	if(list.length!=0){
	let params="";
	Array.from(list).filter(item=>item.checked).forEach((item)=>{
		if(""==params){
			params+=item.value;
		}else{
			params+=",";
			params+=item.value;
		}
	})
	let au=new AjaxUtils;
	let param="usermessageadmin.servlet?param=delete&id="+params;
	au.ajaxRequest(param,(xhr)=>{
		var Json=JSON.parse(xhr.responseText);
		if(Json.msg=="ok"){
			alert("删除成功");
			window.location.href="login.servlet?param=UserEdit";
		}else{
			alert("删除失败");
		};
		
		
	});
	}
	else{
		alert("请选择数据");
	}
}
window.addEventListener("load",init,false);